const jwt = require('jsonwebtoken');
const axios = require('axios');
const authorization = async (token) => {
  let res = null;
  try {
    const {data} = await axios.get('http://47.102.145.189:8009/user',{
      headers:{
        authorization: token
      }
    })
    res = {
      ...data
    }
  }catch(error){
    res = {
      ...error
    }
  }
  return res;
}

module.exports = authorization;